import java.util.Scanner;


public class CountPrimeNumber {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String input = scanner.nextLine();
    int m = Integer.parseInt(input.split(" ")[0]);
    int n = Integer.parseInt(input.split(" ")[1]);

    int count = 0, number = 2;
    while (count < n) {
      if (isPrime(number)) {
        count++;
        if (count >= m && (count - m + 1) % 10 != 0) {
          System.out.print(number);
          System.out.print(count == n ? "" : " ");
        } else if (count >= m && (count - m + 1) % 10 == 0) {
          System.out.print(number);
          System.out.print("\n");
        }
      }
      number++;
    }
  }

  private static boolean isPrime(int number) {
    if (number == 1 || number == 2)
      return true;
    if (number % 2 == 0)
      return false;
    for (int i = 3; i * i <= number; i++) {
      if (number % i == 0)
        return false;
    }
    return true;
  }
}
